Package com.cisco.pt.ipc.sim.impl
Class HTTPClientImpl
java.lang.Object
com.cisco.pt.ipc.impl.IPCObjectImpl
com.cisco.pt.ipc.sim.impl.ProcessImpl
com.cisco.pt.ipc.sim.impl.HTTPClientImpl
- All Implemented Interfaces:
IPCObject,HTTPClient,Process
- Direct Known Subclasses:
HTTPBackgroundClientImpl
Information provided by the PKI file:
\class HttpClient
\brief HttpClient handles and manipulates the HTTP client on devices.
\example network().getDevice("PC0").getProcess("HttpClient")
- Author:
- Auto-generated
-
Field Summary
Fields inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
accessMessage, ipcFactory, packetTracerSession -
Constructor Summary
ConstructorsConstructorDescriptionHTTPClientImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage) -
Method Summary
Modifier and TypeMethodDescriptionbooleancancel()Information provided by the PKI file:Information provided by the PKI file:booleanInformation provided by the PKI file:booleanhttp_delete(String url, String body, String header) booleanbooleanbooleanbooleanisHttps()Information provided by the PKI file:voidsetHttps(boolean status) Information provided by the PKI file:Methods inherited from class com.cisco.pt.ipc.sim.impl.ProcessImpl
getOwnerDeviceMethods inherited from class com.cisco.pt.ipc.impl.IPCObjectImpl
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSession, sendMessage, sendMessageWithReturn, translateToCommandStatusStringPairMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.cisco.pt.ipc.IPCObject
getAccessMessage, getClassName, getFactory, getObjectUUID, getPacketTracerSessionMethods inherited from interface com.cisco.pt.ipc.sim.Process
getOwnerDevice
-
Constructor Details
-
HTTPClientImpl
public HTTPClientImpl(IPCFactory ipcFactory, PacketTracerSession packetTracerSession, IPCMessageLTV accessMessage)
-
-
Method Details
-
go
Information provided by the PKI file:
\brief Creates an HTTP request to the specified URL. \param url, the URL of the destination. \return bool, true if successful, otherwise false.- Specified by:
goin interfaceHTTPClient- Parameters:
url- Takes in a parameter of url- Returns:
- boolean Returns a boolean
-
http_get
- Specified by:
http_getin interfaceHTTPClient- Parameters:
url- Takes in a parameter of urlheader- Takes in a parameter of header- Returns:
- boolean Returns a boolean
-
http_post
- Specified by:
http_postin interfaceHTTPClient- Parameters:
url- Takes in a parameter of urlbody- Takes in a parameter of bodyheader- Takes in a parameter of header- Returns:
- boolean Returns a boolean
-
http_delete
- Specified by:
http_deletein interfaceHTTPClient- Parameters:
url- Takes in a parameter of urlbody- Takes in a parameter of bodyheader- Takes in a parameter of header- Returns:
- boolean Returns a boolean
-
http_put
- Specified by:
http_putin interfaceHTTPClient- Parameters:
url- Takes in a parameter of urlbody- Takes in a parameter of bodyheader- Takes in a parameter of header- Returns:
- boolean Returns a boolean
-
cancel
public boolean cancel()Information provided by the PKI file:
\brief cancel HTTP request and close tcp connection. \return bool, true if successful, otherwise false.- Specified by:
cancelin interfaceHTTPClient- Returns:
- boolean Returns a boolean
-
getLastPageContent
Information provided by the PKI file:
\brief Returns the last page content retrived from an HTTP response. \return string, the last page content retrived from an HTTP response.- Specified by:
getLastPageContentin interfaceHTTPClient- Returns:
- String Returns a String
-
setHttps
public void setHttps(boolean status) Information provided by the PKI file:
\brief Sets the HttpClient process to use HTTPS if status is true, otherwise HTTP. \param status, true if HTTPS, false if HTTP.- Specified by:
setHttpsin interfaceHTTPClient- Parameters:
status- Takes in a parameter of status
-
isHttps
public boolean isHttps()Information provided by the PKI file:
\brief Returns true if the HttpClient process is set to HTTPS, false if HTTP. \return bool, true if the HttpClient process is set to HTTPS, false if HTTP.- Specified by:
isHttpsin interfaceHTTPClient- Returns:
- boolean Returns a boolean
-